from django.conf.urls.defaults import * #IGNORE:W0614
from django.conf import settings


urlpatterns = patterns('', 
    # Help redirection
    (r'^doc/$', 'festivals.help.redirect_to_help'), 
    
    # Login
    (r'^accounts/login/$', 'django.contrib.auth.views.login'), 
    
    # Ajax helpers
    (r'^ajax-helper/should-hide-concert/(?P<fest_id>\d)/', 
        'festivals.views.should_hide_concert_type'), 
    
    # Admin overrides
    (r'^festivals/participant/add/', 'festivals.views.add_participant'), 
    (r'^festivals/participant/(\d+)/$', 'festivals.views.edit_participant'), 
    (r'^festivals/festival/(\d+)/generate-program/$', 'festivals.views.generate_festival_program'), 
    (r'^vote/(\d+)/$', 'festivals.views.vote_now'), 
    (r'^festivals/concert/(\d+)/show-votes/$', 'festivals.views.show_votes_score'), 

    # Admin
    (r'', include('django.contrib.admin.urls')), 
)

if settings.DEBUG:
    from os.path import abspath, dirname
    media_path = dirname(abspath(__file__)) + '/media'
    urlpatterns += patterns('django.views.static', 
        (r'^media/(?P<path>.*)$', 'serve', {'document_root': media_path}), 
    ) 